﻿
/*
 *  author: able
 *  @2012/2/20 18:12:38
 * 
 */
namespace __ts.Core.Api
{
    /// <summary>
    /// 
    /// </summary>
    public interface IoSessionConfig
    {
        /**
         * Returns idle time for the specified type of idleness in milli-seconds.
         * @see IdleStatus
         * @return the idle time in ms or <code>-1</code> if no idle time configured for this status
         */
        long getIdleTimeInMillis(IdleStatus status);

        /**
         * Set the delay before an {@link IoSession} is considered idle for a given
         * operation type (read/write/both) @see IdleStatus
         *
         * @param status          the type of idle (read/write/both) timeout to set
         * @param ildeTimeInMilli the timeout in milliseconds (<code>-1</code> for no idle detection on this status)
         */
        void setIdleTimeInMillis(IdleStatus status, long ildeTimeInMilli);
    }
}